package com.cloud.cloudvideo.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

//@Data
@Component
public class ConfigUtil {

	private static String indexurl;
	private static String indexImg;
	private static String productName;
	private static String defaultPassword;
	  /** 上传路径 */
    private static String uploadPath;
    /** ffmpeg路径 */
    private static String ffmpeg;
	public static String getUploadPath() {
		return uploadPath;
	}
	public static String getFfmpeg() {
		return ffmpeg;
	}
	
	
	@Value("${file.uploadPath}")
	public  void setUploadPath(String uploadPath) {
		ConfigUtil.uploadPath = uploadPath;
	}
	
	@Value("${file.ffmpeg}")
	public  void setFfmpeg(String ffmpeg) {
		ConfigUtil.ffmpeg = ffmpeg;
	}

	public static String getIndexurl() {
		return indexurl;
	}

	public static String getIndexImg() {
		return indexImg;
	}

	public static String getProductName() {
		return productName;
	}

	/**
	 * 注意这里没有static
	 */
	@Value("${index.url}")
	public void setIndexurl(String indexurl) {
		ConfigUtil.indexurl = indexurl;
	}

	@Value("${index.image}")
	public void setIndexImg(String indexImg) {
		ConfigUtil.indexImg = indexImg;
	}

	@Value("${index.productName}")
	public void setProductName(String productName) {
		ConfigUtil.productName = productName;
	}

	public static String getDefaultPassword() {
		return defaultPassword;
	}
	
	@Value("${user.defaultPassword}")
	public void setDefaultPassword(String defaultPassword) {
		ConfigUtil.defaultPassword = defaultPassword;
	}

}
